package com.xiaofengstu.mcams.web.controller;


import com.xiaofengstu.mcams.annotation.ILog;
import com.xiaofengstu.mcams.dto.BasicResultDTO;
import com.xiaofengstu.mcams.enums.RespStatusEnum;
import com.xiaofengstu.mcams.web.entity.TType;
import com.xiaofengstu.mcams.web.service.TTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fengzeng
 * @since 2022-05-07
 */
@RestController
@RequestMapping("/web/type")
@RequiredArgsConstructor
public class TTypeController {

  private final TTypeService tTypeService;


  @ILog("获取资产类型列表")
  @GetMapping("/list")
  public BasicResultDTO<List<TType>> getTypeList() {
    return new BasicResultDTO<>(RespStatusEnum.SUCCESS, tTypeService.list());
  }

}
